<div class="posts index">
	<h2><?php echo __d('posts','Posts');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('domain_id');?></th>
			<th><?php echo $this->Paginator->sort('user_id');?></th>
			<th><?php echo $this->Paginator->sort('name');?></th>
			<th><?php echo $this->Paginator->sort('status');?></th>
			<th class="actions"><?php echo $this->Html->link(__d('posts','New Post'), array('action' => 'add')); ?></th>
	</tr>
	<?php
	foreach ($posts as $post): ?>
	<tr onclick="document.location='<?php echo $this->Html->url(array('action' => 'view', $post['Post']['id']),true);?>'">
		<td><?php echo h($post['Post']['id']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($post['Domain']['name'], array('controller' => 'domains', 'action' => 'view', $post['Domain']['id'])); ?>
		</td>
		<td>
			<?php echo $this->Html->link($post['User']['username'], array('controller' => 'users', 'action' => 'view', $post['User']['id'])); ?>
		</td>
		<td><?php echo h($post['Post']['name']); ?>&nbsp;</td>
		<td><?php echo h($post['Post']['status']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__d('posts','View'), array('action' => 'view', $post['Post']['id'])); ?>
			<?php echo $this->Html->link(__d('posts','Edit'), array('action' => 'edit', $post['Post']['id'])); ?>			
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __d('posts','Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __d('posts','previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__d('posts','next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<?php echo $this->element('/menu/left')?>